﻿/// <reference path="../GeneratedArtifacts/viewModel.js" />

myapp.trTraingroupStakeholder.created = function (entity) {
    entity.details.entitySet.dataService.StakeholderOptionsOnly()
        .filter('StaticId eq 4')    // Teilnehmer
        .top(1)
        .execute()
        .then(function (result) {
            if (result.results.length > 0) {
                entity.setAttendanceType(result.results[0]);
            }
        }, function (error) {
        });
};